package com.principle.proxy;

/**
 * 静态代理：
 * 代理模式优点：职责清晰，高拓展性
 * @author ZH-SW-Zhangxg1
 *
 */
public class SubjectProxy implements Subject {

	private Subject subject = null;
	
	//默认被代理者
	public SubjectProxy() {
		this.subject = new SubjectProxy();
	}
	
	//通过构造函数传递代理者
	public SubjectProxy(Object...objects) {
		
	}
	
	public SubjectProxy(Subject _subject) {
		this.subject = _subject;
	}
	
	@Override
	public void request() {
		this.before();
		this.subject.request();
		this.after();
	}
	
	private void before() {}
	
	private void after() {}

}
